home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
forms
/
3dgd
/
main.frm
next >
Wrap
Text File
|
1995-03-01
|
5KB
|
158 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Form1"
ClientHeight = 4020
ClientLeft = 3000
ClientTop = 2325
ClientWidth = 4590
FillColor = &H00FF0000&
FillStyle = 0 'Solid
Height = 4425
Left = 2940
LinkTopic = "Form1"
ScaleHeight = 4020
ScaleWidth = 4590
Top = 1980
Width = 4710
WindowState = 2 'Maximized
Begin ListBox List1
Height = 2370
Left = 1200
TabIndex = 2
Tag = "OLU"
Top = 3480
Width = 2175
End
Begin TextBox Text2
Height = 375
Left = 1440
TabIndex = 1
Tag = "OLD"
Text = "Text2"
Top = 1680
Width = 1695
End
Begin TextBox Text1
Height = 375
Left = 1440
TabIndex = 0
Tag = "OLD"
Text = "Text1"
Top = 840
Width = 1695
End
Begin Label lblFrameLabel
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = " Frame Label "
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1440
TabIndex = 6
Top = 560
Width = 1230
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "3D Label"
Height = 195
Left = 5520
TabIndex = 5
Tag = "OLU"
Top = 840
Width = 1935
End
Begin Label lblPoint2
Caption = "Label1"
Height = 255
Left = 7920
TabIndex = 4
Top = 5520
Visible = 0 'False
Width = 255
End
Begin Label lblPoint1
Caption = "Label1"
Height = 255
Left = 4800
TabIndex = 3
Top = 480
Visible = 0 'False
Width = 255
End
End
Option Explicit
'3D Frames, Panels, and Controls by Greg DeBacker
'These routines are free to use by anyone.
'Send comments to Greg DeBacker, CIS # 71042,36
'There are 3 routines in the BAS file, THREED.BAS, that will make 3D Panels,
'3D Frames, and 3D Controls. The first 2, DrawFrame and DrawPanel, I route.
'The thrid, OutLines, was taken from the VisData sample that shipped with
'VB 3.0. However, I did make some modifications to this routine to allow for
'raised and recessed controls.
'All of the routines in this sample are called from the Form_Paint event.
'****DrawFrame****
' The synatx for DrawFrame:
' DrawFrame Form to draw on, Control that will be in the upper_
' left corner, Control that will be in the lower right_
' corner, offset from the controls
'
'I used a Label control for the frame label. If the label caption will be
'changing at run-time set the AutoSize property to True. It also looks better
'if you pad the caption with a leading and trailing space (Chr$(32)).
'****DrawPanel****
' The synatx for DrawPanel:
' DrawPanel Form to draw on, Control that will be in the upper_
' left corner, Control that will be in the lower right_
' corner, offset from the controls, thickness of the border
'****OutLines****
' The synatx for OutLines:
' OutLines Form to draw on
'
' The controls that you want to be 3Ded need to have their Tag property
' set. The two options are:
' Control.Tag = "OLD" (Out Line Down) Recessed
' Control.Tag = "OLU" (Out Line Up) Raised
Sub Form_Load ()
BackColor = QBColor(7)
Dim k%
List1.AddItem "Raised List Box"
For k% = 1 To 50
List1.AddItem "Item # " & Str$(k%)
Next k%
List1.ListIndex = 0
End Sub
Sub Form_Paint ()
' Draw the panel for the 2 text boxes
DrawFrame Me, Text1, Text2, 200
' Draw the panel for the list box
DrawFrame Me, List1, List1, 200
' Draw using the two invisible Label controls as boundries
DrawPanel Me, lblPoint1, lblPoint2, 200, 80
' Draw the panel for the Label
DrawPanel Me, Label1, Label1, 80, 40
'Outline the controls
OutLines Me
End Sub